function Script() {
  THREE.Object3D.call(this)

  this.code = ''
  this.func = Function(this.code)
}

Script.prototype = Object.create(THREE.Object3D.prototype)
Script.prototype.update = update
Script.prototype.setLoopCode = setLoopCode

function setLoopCode(code) {
  this.code = code
  this.func = Function(this.code)
}

function update() {
  this.func()
}
